iT邦幫忙

2021 iThome 鐵人賽

DAY 19
0
Modern Web

小白的從零開始食譜搜尋系統系列 第 19

JS語法學習Day3

  • 分享至 

  • xImage
  •  

學習目標
object 物件、while 迴圈、密碼檢驗程式
object 物件
可以存放許多key(鍵) 和value(值)
https://ithelp.ithome.com.tw/upload/images/20210928/20140497Dk7uGULqtn.png
這裡的this.name 意思等於 person.name


While迴圈
i++ 意思是i=i +1
https://ithelp.ithome.com.tw/upload/images/20210928/20140497wrsp0pzrYt.png


密碼檢驗程式
功能 : 限定使用者在三次之內輸入正確的密碼
https://ithelp.ithome.com.tw/upload/images/20210928/20140497IqogxNRO0z.png
var entry_count = 0; => 使用者輸入次數
var entry_limit = 3; => 密碼輸入限定次數
var out_of_limit = false; => 是否超出限定次數
https://ithelp.ithome.com.tw/upload/images/20210928/201404978UIQieN14j.png


上一篇
JS語法學習Day2
下一篇
JS語法學習Day4
系列文
小白的從零開始食譜搜尋系統30
圖片
  直播研討會
圖片
{{ item.channelVendor }} {{ item.webinarstarted }} |
{{ formatDate(item.duration) }}
直播中

尚未有邦友留言

立即登入留言